home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Snippets / SuperSplash 1.0d1 / sources / •AZN_DEBUG / azn_dbug.h < prev   
C/C++ Source or Header  |  1995-10-23  |  964b  |  44 lines

  1. #pragma once
  2. /*
  3. *    AZN_DBUG.H
  4. *
  5. *    Decl's for utility 'C' functions for debugging apps
  6. *    © Andrew Nemeth, Warrimoo Australia, 1995
  7. *    aznemeng@zeta.org.au
  8. *
  9. *    File Created:        6 Mar 95
  10. *    File Ammended:        6, 7, 11, 12 Mar;
  11. *                    3 Jun;
  12. *                    7, 23 Oct 95.
  13. */
  14.  
  15. //                                                        uncomment for RUNTIME version
  16. //#define    NDEBUG
  17.  
  18.  
  19. #ifdef    NDEBUG
  20. //                                                        all debug stuff become no-op's
  21.     #define        ASSERT(f)                    NULL
  22.  
  23.     #define        INIT_DEBUG()                NULL
  24.     #define        SALT_MEMORY(a,b)            NULL
  25.     #define        DEBUG_TRAP()                NULL
  26.     #define        MY_DEBUG_FILESTRING( s )        NULL
  27.  
  28. #else
  29.  
  30.     void            myAlert                    ( char *, unsigned );
  31.     #define        ASSERT(f)                    if (f)        \
  32.                                             NULL;    \
  33.                                         else            \
  34.                                             myAlert( __FILE__, __LINE__ )
  35.  
  36.     void            INIT_DEBUG                ( void );
  37.     void            SALT_MEMORY                ( void *, long );
  38.  
  39.     #define        DEBUG_TRAP()                Debugger()
  40.  
  41.     void            myDBG_FileString            ( char *, char *, unsigned );
  42.     #define        MY_DEBUG_FILESTRING( s )        myDBG_FileString( s, __FILE__, __LINE__ )
  43.  
  44. #endif